package apt.action;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;

import apt.bean.SupplierBean;
import apt.dao.SupplierDao;

public class SupplierAction extends ActionSupport{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private SupplierBean supplierBean;
	private SupplierDao supplierDao;
	private List<SupplierBean> listSupplier;
	
	public SupplierAction() {
		supplierDao = new SupplierDao();
	}
	
	public String getAllSupplier()
	{
		try {
			listSupplier = supplierDao.getListSupplier();
		} catch (Exception e) {
			return ERROR;
		}
		return SUCCESS;
	}

	public SupplierBean getSupplierBean() {
		return supplierBean;
	}

	public void setSupplierBean(SupplierBean supplierBean) {
		this.supplierBean = supplierBean;
	}

	public SupplierDao getSupplierDao() {
		return supplierDao;
	}

	public void setSupplierDao(SupplierDao supplierDao) {
		this.supplierDao = supplierDao;
	}

	public List<SupplierBean> getListSupplier() {
		return listSupplier;
	}

	public void setListSupplier(List<SupplierBean> listSupplier) {
		this.listSupplier = listSupplier;
	}
	
	
}
